package com.sam4cloud.oauth2.project.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.sam4cloud.common.core.model.supers.Convert;
import com.sam4cloud.common.core.enums.DelFlagEnum;
import com.sam4cloud.common.core.enums.StatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 用户信息表
 * </p>
 *
 * @author Sam
 * @since 2022-11-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("oauth_user")
@ApiModel(value="OauthUser对象", description="用户信息表")
public class OauthUser extends Convert {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "id")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "部门id")
    private String deptId;

    @ApiModelProperty(value = "角色id")
    private String roleId;

    @ApiModelProperty(value = "用户名")
    private String userName;

    @ApiModelProperty(value = "登陆名")
    private String loginName;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "性别 0-男 1-女")
    private String gender;

    @ApiModelProperty(value = "手机")
    private String phone;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "状态 0-正常 1-禁用 ")
    private StatusEnum status;

    @ApiModelProperty(value = "删除标识 0-正常 1-删除")
    @TableLogic
    private DelFlagEnum delFlag;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;


}
